<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| 后台API路由文件
|--------------------------------------------------------------------------
|
*/

Route::namespace('Admin')->group(function () {

    /**
     * 不需要验证的路由
     */
    Route::any('/login', 'LoginController@login');


    /**
     * 需要验证中间介的路由 登录访问限制
     */
    Route::middleware(['admin'])->group(function () {
        //获取后台用户列表
        Route::any('/getUserList', 'AdminUserController@index');
        //退出登录
        Route::any('/loginOut', 'LoginController@loginOut');
        //添加后台用户
        Route::post('/addAdminUser', 'AdminUserController@addAdminUser');
        //获取后台用户详情
        Route::post('/getAdminUserInfo', 'AdminUserController@getAdminUserInfo');
        //更新后台用户详情
        Route::post('/updateAdminUser', 'AdminUserController@updateAdminUser');
        //删除后台用户
        Route::post('/deleteAdminUser', 'AdminUserController@deleteAdminUser');

    });

});





